home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.2 / IRIX 6.2 CD2.iso / dist / outbox.idb / var / www / cgi-bin / MachineInfo.z / MachineInfo
Text File  |  1996-06-10  |  1KB  |  75 lines

  1. #!/usr/bin/perl
  2.  
  3. #__________________________________________________________
  4. #
  5. #   File:    MachineInfo
  6. #   By:      Matt Ho
  7. #   Date:    7/23/95
  8. #   Purpose: Display host configuration
  9. #__________________________________________________________
  10.  
  11. $hostname = `/usr/bsd/hostname` ;
  12. open(DATA, "/sbin/hinv |") || &CantGetInfo ;
  13.  
  14. print <<ENDOFTEXT ;
  15. Content-type: text/html
  16.  
  17. <head>
  18.     <title>
  19.         hinv for $hostname
  20.     </title>
  21. </head>
  22.  
  23. <body bgcolor="42426f" text="ffffff" link="ffff00" vlink="93db70"
  24. alink="cc3232">
  25. <body background=/images/logo.gif>
  26. <img src=/images/poweredsgi.gif><p><br>
  27.  
  28.  
  29. <h1 align=center>
  30.     hinv for $hostname
  31. </h1>
  32.  
  33. <hr size=3 width=50% noshade>
  34. <p>
  35.  
  36. <center>
  37. <table>
  38. ENDOFTEXT
  39.  
  40. while( <DATA> )
  41. {
  42.     ($name, $value) = split(':', $_, 2) ;
  43.     print <<ENDOFTEXT ;
  44. <tr>
  45.     <th align=right>
  46.         $name
  47.     </th>
  48.     <td>
  49.         $value
  50.     </td>
  51. </tr>
  52. ENDOFTEXT
  53. }
  54. close(DATA) ;
  55.  
  56. print <<ENDOFTEXT ;
  57. </table>
  58.  
  59. <p>
  60. <hr size=3 width=50% noshade>
  61.  
  62. ENDOFTEXT
  63.  
  64. if( defined $ENV{'PATH_INFO'} )
  65. {
  66.     print <<ENDOFTEXT ;
  67. <form action=$ENV{'PATH_INFO'} method=get>
  68.     <input type=submit value="Return to the previous page">
  69. </form>
  70. ENDOFTEXT
  71. }
  72.  
  73. print "\n</body></html>\n\n" ;
  74.  
  75.